package org.assertj.ohos.api.view;

import ohos.agp.animation.AnimatorProperty;
import org.assertj.core.api.AbstractAssert;
import static org.assertj.core.api.Assertions.assertThat;

/** Assertions for {@link AnimatorProperty} instances. */
public class ViewPropertyAnimatorAssert
    extends AbstractAssert<ViewPropertyAnimatorAssert, AnimatorProperty> {
  public ViewPropertyAnimatorAssert(AnimatorProperty actual) {
    super(actual, ViewPropertyAnimatorAssert.class);
  }

  public ViewPropertyAnimatorAssert hasDuration(long duration) {
    isNotNull();
    long actualDuration = actual.getDuration();
    assertThat(actualDuration) //
        .overridingErrorMessage("Expected duration <%s> but was <%s>", duration, actualDuration) //
        .isEqualTo(duration);
    return this;
  }

  public ViewPropertyAnimatorAssert hasInterpolator(int interpolator) {
    isNotNull();
    int actualInterpolator = actual.getCurveType();
    assertThat(actualInterpolator) //
        .overridingErrorMessage("Expected interpolator <%s> but was <%s>.", interpolator,
            actualInterpolator) //
        .isEqualTo(interpolator);
    return this;
  }
/* // TODO: wang, not found in ohos
  public ViewPropertyAnimatorAssert hasStartDelay(long delay) {
    isNotNull();
    long actualDelay = actual.getStartDelay();
    assertThat(actualDelay) //
        .overridingErrorMessage("Expected start delay <%s> but was <%s>", delay, actualDelay) //
        .isEqualTo(delay);
    return this;
  }*/
}
